Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Displaying the Page Setup and Print Dialog Boxes


GXJobPrintDialog

You can use the GXJobPrintDialog function to display the Print dialog box when the user chooses the Print menu command from the File menu.

gxDialogResult GXJobPrintDialog (gxJob aJob,
                              gxEditMenuRecord *anEditMenuRecord);
aJob
A reference to the job object whose print settings you are allowing the user to modify.
anEditMenuRecord
A pointer to the Edit menu structure.
function result
The user's response to the dialog box.
DESCRIPTION
After you use the GXJobPrintDialog function to display the Print dialog box, the user can specify information related to actual printing of the document. For example, the user can specify the printer, print quality, number of copies to print, page range, automatic or manual paper feed, and whether a document should be output to a printer or a file.

A user must select an output printer in the Print dialog box regardless of the formatting printer specified in the Page Setup dialog box. The output printer does not need to be in the same device class as the printer for which the document is formatted.

In the anEditMenuRecord parameter you specify an Edit menu structure. Your application specifies the location of the Edit menu and its menu items in the Edit menu structure.

The function returns gxOKSelected if Print is chosen or gxCancelSelected if Cancel is chosen.

If an error occurs, the function returns gxCancelSelected. Call the GXGetJobError function to determine which error occurred.

This function causes QuickDraw GX to send the gxJobPrintDialog message, which you can override to customize the Print dialog box.

QuickDraw GX stores a user's responses to some items in the Print dialog box in the job collection.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
Listing 2-15 on page 2-39 shows how to use the GXJobPrintDialog function to display the Print dialog box.

The Edit menu structure is described on page 2-48.

The dialog box result enumeration is described on page 2-48.

The job collection is discussed in the chapter "Page Formatting and Dialog Box Customization" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help